import request from '@/utils/request'

// App管理-广告列表
export function advertisementPages(query) {
    return request({
        url: '/manage/ad/apartment/list',
        method: 'get',
        params: query
    })
}

// App管理-新增广告
export function addAdvertisement(data) {
    return request({
        url: '/manage/ad/apartment',
        method: 'post',
        data: data
    })
}

// App管理-广告修改
export function updateAdvertisement(data) {
    return request({
        url: '/manage/ad/apartment',
        method: 'put',
        data: data
    })
}

// App管理-广告删除
export function delAdvertisement(bannerId) {
    return request({
        url: '/manage/ad/apartment/'+bannerId,
        method: 'delete',
    })
}

// App管理-广告获取详情
export function findAdvertisementById(bannerId) {
    return request({
        url: '/manage/ad/apartment/'+bannerId,
        method: 'get',
    })
}
// App管理-广告审核
export function advertisementAudit(data) {
    return request({
        url: '/advertisement/audit',
        method: 'put',
        data: data
    })
}
// App管理-广告上架下架
export function advertisementStatus(data) {
    return request({
        url: '/advertisement/status',
        method: 'put',
        data: data
    })
}

// App管理-获取所有广告位
export function adspaceFindAll(query) {
    return request({
        url: '/adspace/findAll',
        method: 'get',
        params: query
    })
}

